<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>作品列表</title>

    <!-- Bootstrap -->
    <link href="/cy/Public/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/cy/Public/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="/cy/Public/css/lightbox.min.css"/>
		<link rel="stylesheet" type="text/css" href="/cy/Public/lib/bootstrap_validator/css/bootstrapValidator.min.css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
  	  <script src="/cy/Public/js/html5shiv.min.js" type="text/javascript" charset="utf-8"></script>
  	  <script src="/cy/Public/js/respond.min.js" type="text/javascript" charset="utf-8"></script>
    <![endif]-->
	</head>
	<body>
	<div class="container">
		<div class="toptt">&nbsp;</div>
			<div class="jumbotron well text-center">
				<h2>
					毕业季——留下你的青春回忆
				</h2>
			</div>	

	</div>
	<div class="container">
		<div id="masonry" class="container-fluid">
			<?php if(is_array($list)): $k = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><div class="thumbnail item">
        		<div class="imgs">
        			<a href="/cy/Uploads/<?php echo ($vo["tpurl"]); ?>" data-lightbox="lightbox_" title="<?php echo ($vo["id"]); ?> 号作品"><img src="/cy/Uploads/<?php echo ($vo["tpurl"]); ?>"></a>
            	<!--
                	作者：ylwang@126.com
                	时间：2016-04-25
                	描述：
                <img src="/cy/Uploads/<?php echo ($vo["tpurl"]); ?>"  onclick="showBigImg(this.src)"/>  -->	
        		</div>
        		<div class="caption">
            		
            		<div class="content">                
						姓名：<?php echo ($vo["name"]); ?><br>						
						所属学院：<?php echo ($vo["xueyuan"]); ?><br>
						毕业寄语：<?php echo ($vo["jiyu"]); ?>					
					<a href="javascript:void(0);" onclick="changeStatus(<?php echo ($vo["id"]); ?>,this)"><?php echo ($vo["status"]); ?></a>
            		</div>
            		<div class="author">
                		提交时间：<?php echo (date('Y-m-d',$vo["ctime"])); ?>
            		</div>
        		</div>
    		</div><?php endforeach; endif; else: echo "" ;endif; ?>
		</div>

	</div>	
	

	
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
   aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog style="display: inline-block; width: auto;"">
      <div class="modal-content">
         <div class="modal-header">
            <button type="button" class="close" 
               data-dismiss="modal" aria-hidden="true">
                  &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">
              	标题
            </h4>
         </div>
         <div class="modal-body">
            <img class="img-responsive" id="imgInModalID" src=""/>
         </div>
      </div><!-- /.modal-content -->
</div><!-- /.modal -->


    <script src="/cy/Public/js/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="/cy/Public/js/bootstrap.js"></script>
    <script src="/cy/Public/lib/bootstrap_validator/js/bootstrapValidator.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="/cy/Public/js/masonry.pkgd.min.js"></script>
	<script src="/cy/Public/js/imagesloaded.pkgd.min.js"></script>	
	<script src="/cy/Public/js/lightbox.min.js"></script>
	<script>
		$(function(){  
  			$('#container').masonry({  
    			// options  
    			itemSelector : '.item',  
    			columnWidth : 240  
  			});  
  			
  			var masonryNode = $('#masonry'); 
	        masonryNode.imagesLoaded(function(){ 
            masonryNode.masonry({ 
                itemSelector: '.thumbnail', 
                isFitWidth: true
            }); 

        }); 
	        
  			
		});  
		function showBigImg(value){
			$("#imgInModalID").attr("src",value);
			//$("#imgInModalID").src = '/Uploads/'+value;
			//alert($("#imgInModalID").attr("src"));
			$("#myModal").modal("toggle");
			 
		}
			
        function changeStatus(id,v){
            $.get('<?php echo U("Index/changeStatus");?>/id/'+id,function(data){
            	//alert(data);
                if(data.status==1){
                    $(v).html(data.info);
                }
            });
        }
	</script>
	</body>
</html>